const G = ({ nav, className = "" }) => {
  return (
    <ul className={className ? className : "submenu"}>
      {nav.map((item) => {
        return (
          <li key={item.label} className="parent">
            {item.label}
            {Array.isArray(item.list) && <G nav={item.list}></G>}
          </li>
        );
      })}
    </ul>
  );
};
export default G;
